<!-- 列表 -->
<extend name="Public:layout" />
<block name="title"><{$authName}></block>

<block name="pluginCSS">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2-metronic.css"/>
</block>
<block name="CSS"></block>

<block name="loadJS">

<script type="text/javascript" src="__PUBLIC__/Admin/plugins/select2/select2.min.js"></script>
<script src="__PUBLIC__/admin/scripts/layer/layer.js" type="text/javascript"></script>	


</block>
<block name="setJS">
<script>
var ajaxUrl="<{:U('index')}>";
function del(id){
	layer.confirm('确定卸载该评价？',function(index){
		$.post(ajaxUrl,{id:id,ajax:'del'},function(data){
			if(data){
				layer.msg('评价删除成功！',{icon: 1,time: 2000});
				location.reload();
				
			}else{
				layer.msg('评价删除失败！',{icon: 2,time: 2000});
				return;
			}
	   });					
	});	
}  
</script>
</block>
<block name="initJS">
$('#searchNum').change(function(){
	var pageSize= $(this).val();
	location.href="<{:U('index')}>?pageSize="+pageSize;
});
</block>

<block name="pagetitle">增删改查</block>
<block name="page">
<div class="row">
	<div class="col-md-12">

		<div class="portlet">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa <{$authIco}>"></i><{$authName}>
				</div>
				
				
			</div>
			<div class="portlet-body">				
				<label>
				   <select class="form-control" name="searchNum" id="searchNum">
				   <if condition="$PQ['pageSize'] eq 1">selected</if>
				   <option <if condition="$PQ['pageSize'] eq 5">selected</if> value="5">每页显示5条记录</option>
				   <option <if condition="$PQ['pageSize'] eq 15">selected</if> value="15">每页显示15条记录</option>
				   <option <if condition="$PQ['pageSize'] eq 20">selected</if> value="20">每页显示20条记录</option>
				   </select>
				</label>
				<div class="pull-right">
				<form class="form-inline" role="form" action="<{:U('index')}>" method="post">
				
					<div class="form-group">
						<label class="sr-only" for="shopName">所属店铺：</label>
						<input type='text' placeholder="所属店铺" class="form-control" name='shopName' id='shopName' value='<{$shopName}>'/>
					</div>
					<div class="form-group">
						<label class="sr-only" for="goodsName">商品名称：</label>
						<input type='text' placeholder="商品名称"  class="form-control" name='goodsName' id='goodsName' value='<{$goodsName}>'/>
					</div>
					
					<button type="submit" class="btn green">
					搜索  <i class="fa fa-search"></i>
					</button>
									
				
				</form>
				</div>
				<table class="table table-striped table-bordered table-hover">
<thead>
             <tr>
               <th>序号</th>
               <th colspan='2'>商品</th>
               <th>状态</th>
               <th>商品评分</th>
               <th>时效评分</th>
               <th>服务评分</th>
               <th>操作</th>
             </tr>
           </thead>
           <tbody>
            <volist name="PQ['list']" id="vo" key='i'>
             <tr>
               <td rowspan='2'><{$i}></td>
               <td rowspan='2' style='border-right:0px;'>
               <img src='__UPLOAD__/<{$vo['goodsImg']?$vo['goodsImg']:$COMMON.goodsImage}>' width='50'/>
               </td>
               <td rowspan='2' style='border-left:0px;'>
               <span><{$vo['goodsName']}></span><br/>订单：<{$vo['orderNo']}></td>
               <td >
               <if condition="$vo['isShow'] == 1 ">
               <span class='btn btn-xs blue'>显示</span>
               <else/>
               <span class='btn btn-xs default'>隐藏</span>
               </if>
               </td>
               <td>
               <div>
               	<for start="0" end="$vo['goodsScore']">
					<img src="__PUBLIC__/Admin/img/icon_score_yes.png"/>
				</for>&nbsp;<{$vo['goodsScore']}> 分
				</div>
				</td>
				<td>
				<div>
               	<for start="0" end="$vo['timeScore']">
					<img src="__PUBLIC__/Admin/img/icon_score_yes.png"/>
				</for>&nbsp;<{$vo['timeScore']}> 分
				</div>
                </td>
                <td>
              	<div>
               	<for start="0" end="$vo['serviceScore']">
					<img src="__PUBLIC__/Admin/img/icon_score_yes.png"/>
				</for>&nbsp;<{$vo['serviceScore']}> 分
				</div>
               </td>
               <td rowspan='2'>
               <a class="edit btn btn-xs default" href="<{:U('edit',array('id'=>$vo['id']))}>"><i class="fa fa-edit"></i> 修改</a>
               <a class="delete btn btn-xs red" href="javascript:del(<{$vo['id']}>)"><i class="fa fa-trash-o"></i> 删除</a>
               </td>
             </tr>
             <tr>
               <td colspan='4' style='word-break:break-all;'>评价[<{$vo['loginName']}>]：<{$vo['content']}></td>
             </tr>
             </volist>
           </tbody>
        </table>
        
		<{$PQ['page']}>

        			</div>
		</div>
	</div>
</div>
</block>